﻿set(ProjectName "NetPlugin")

file(GLOB NetPlugin_CC *.cc)
file(GLOB NetPlugin_HH *.h)

add_library(NetPlugin STATIC ${NetPlugin_CC} ${NetPlugin_HH})

add_dependencies(NetPlugin Core)
add_dependencies(NetPlugin Protocol)

target_link_libraries(NetPlugin PRIVATE Protocol)
target_link_libraries(NetPlugin PRIVATE ${LIBEVENT_LIBRARIES})

if(CMAKE_HOST_WIN32)
	add_definitions(-D_LIB)
else()
	#target_link_libraries(NetPlugin -static-libstdc++)
	add_definitions(-D_THREAD_SAFE)
endif()

set_target_properties(NetPlugin PROPERTIES OUTPUT_NAME_DEBUG "NetPlugin")
set_target_properties(NetPlugin PROPERTIES PREFIX "")
set_target_properties(NetPlugin PROPERTIES 
	ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
	RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
	LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})